﻿@{
    Layout = "~/Administration/Views/Shared/_AdminLayout.cshtml";
}
@model Nop.Plugin.Picture.CDN.Models.ConfigureModel
@using Nop.Web.Framework;
@using (Html.BeginForm())
{
    <table class="dashboard">
        <tr>
            <td class="maincol">

                <div id="accordion">
                    <h3>Integrate CDN with your nopCommerce Store</h3>
                    <div>
                        <p>
                            The integration of a Content Delivery Network (CDN) into your website remains one of the easiest and most cost-effective ways to improve web performance. nopAccelerate CDN Plugin supports several CDN service providers and makes the integration into the nopCommerce simple.
                        </p>

                    </div>
                    <h3>CDN Plugin Configuration Instruction</h3>
                    <div>
                        <ol>
                            <li>Create/Configure Pull Zone to be used with your site. Follow the instructions provided by your CDN Service Provider.Use your Site URL as your Origin URL while configuring Pull Zone. Your Origin URL will always be your Site URL. Once configured correctly, you will be able to access images & all static resources on your new CDN URL, which will pull the files from Origin URL for the first request, and then serves all subsequent requests from its cache from the nearest node.</li>
                            <li>If you want to use multiple CDN hostname which allow parallel downloads across hostnames, then configure additional Hostname and its corresponding CNAME entries. This is recommended but not required.</li>
                            <li>Enter all your hostnames in CDN Hostname(s) textbox separated by comma. For example: http://cdn1.yourdomain.com/,http://cdn2.yourdomain.com/,http://cdn3.yourdomain.com/. Make sure to include <b>“http://”</b> at the beginning of hostname & <b>“/”</b> at the end.</li>
                            <li>The nopAccelerate CDN plugin simply rewrite nopCommerce image services to use CDN hostnames instead of your store URL. If you have entered more than one hostnames, then it will try to distribute requests randomly to speed up your website loading by allowing parallel downloads across hostnames.</li>
                            <li>Please restart the application after saving the CDN configuration to make changes.</li>
                        </ol>
                    </div>
                    <h3>CDN Configurations</h3>
                    <div>
                        <table class="adminContent">
                            <tr>
                                <td class="adminTitle">
                                    @Html.NopLabelFor(model => model.DomainNames):
                                </td>
                                <td class="adminData">
                                    @Html.EditorFor(model => model.DomainNames)
                                    @Html.ValidationMessageFor(model => model.DomainNames)
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    @Html.NopLabelFor(model => model.Enable):
                                </td>
                                <td class="adminData">
                                    @Html.EditorFor(model => model.Enable)
                                    @Html.ValidationMessageFor(model => model.Enable)
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <hr />
                                    <br />
                                    <button type="submit" name="configure" class="t-button" value="configure">@T("Admin.Common.Save")</button>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </td>
        </tr>
    </table>
}